﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
using Common;

public partial class User_Business_Ping : System.Web.UI.Page
{
    protected int NewsKey
    {
        get { return string.IsNullOrEmpty(Request["NewsKey"]) ? 0 : Convert.ToInt32(Request["NewsKey"]); }
    }

    protected Dat_News news;

    protected void Page_Load(object sender, EventArgs e)
    {
        news = new News().SelectNews(NewsKey);

        if (!this.IsPostBack)
        {

        }
    }

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        Dat_News news = new Dat_News
        {
            NewsKey = NewsKey,
            Content_Cus_Ping = txt_Content_Cus_Ping.Text.Trim(),
            Content_Cus_PingNum = Convert.ToInt32(txt_Content_Cus_PingNum.SelectedValue)
        };

        if (new News().EditNews_Ping(news))
        {
            WebUtility.JsAlertToParent("服务评价成功", "Business.aspx?menutype=122&type=6");
        }
    }
}
